home *** CD-ROM | disk | FTP | other *** search
/ PC Format (UK) 134 / PC Format DVD 2002.iso / Full / 3D Flash Animator / 3DFlashAnimator3Setup.exe / file0789_1f0a07_1f0e49.bin < prev    next >
Encoding:
Text File  |  2001-11-08  |  3.9 KB  |  147 lines

  1. <comment> Creates a new flash movie. </comment>
  2.  
  3. <title>New Project</title>
  4.  
  5. <script language="EasyScript">
  6.  
  7. registry = "New\\Project";
  8.  
  9. /////////////////
  10. function OnLoad ()
  11. {
  12.     radio_size = getRegistryValue (registry, "radio_size", 1);
  13.     color_depth = getRegistryValue (registry, "color_depth", 3);
  14.     user_width = getRegistryValue (registry, "user_width", 640);
  15.     user_height = getRegistryValue (registry, "user_height", 480);
  16. }
  17. //////////////////////
  18. function CreateMovie ()
  19. {
  20.     movie = new Movie;
  21.     movie.setDefaultName ();
  22.     SetMovieSize ();
  23.     CreateAndClose ();
  24. }
  25. ////////////////////////
  26. function CreateCartoon ()
  27. {
  28.     movie = new Cartoon;
  29.     movie.setDefaultName ();
  30.     SetMovieSize ();
  31.     CreateAndClose ();
  32. }
  33. //////////////////////////
  34. function CreateAnimation ()
  35. {
  36.     movie = new Animation;
  37.     movie.setDefaultName ();
  38.     movie.insertNewFrame();
  39.     SetMovieSize ();
  40.     CreateAndClose ();
  41. }
  42. /////////////////////////
  43. function CreateTimeline ()
  44. {
  45.     movie = new Timeline;
  46.     movie.setDefaultName ();
  47.     movie.frames.allocateFrames (movie.total_frames);
  48.     movie.frames.setFrameIndex (0);
  49.     SetMovieSize ();
  50.     CreateAndClose ();
  51. }
  52. ///////////////////////
  53. function SetMovieSize ()
  54. {
  55.     setRegistryValue (registry, "radio_size", radio_size);
  56.     setRegistryValue (registry, "color_depth", color_depth);
  57.     setRegistryValue (registry, "user_width", user_width);
  58.     setRegistryValue (registry, "user_height", user_height);
  59.  
  60.     width = 320;
  61.     height = 240;
  62.     switch (radio_size){
  63.         case 1:
  64.             width = 320;
  65.             height = 240;
  66.             break;
  67.         case 2:
  68.             width = 480;
  69.             height = 360;
  70.             break;
  71.         case 3:
  72.             width = 640;
  73.             height = 480;
  74.             break;
  75.         case 4:
  76.             width = 468;
  77.             height = 60;
  78.             break;
  79.         case 5:
  80.             width = user_width;
  81.             height = user_height;
  82.             break;}
  83.  
  84.     movie.width = width;
  85.     movie.height = height;
  86.     movie.export_width = width;
  87.     movie.export_height = height;
  88.     movie.depth = color_depth;
  89.     movie.saved();
  90. }
  91. /////////////////////////
  92. function CreateAndClose ()
  93. {
  94.     if (movie.create ()){
  95.         movie.resetCenter ();
  96.         window.returnValue (movie);
  97.         window.close ();}
  98. }
  99. ////////////////////
  100. </script>
  101.  
  102. <body bgcolor="normal" text="#000000" OnLoad="OnLoad()" OnEnter="CreateFlash()" translate>
  103. <div valign=middle>
  104.  
  105. <table><tr><td>
  106.  
  107. <table>
  108.     <tr><td valign=top><img src="images/large_flash.bitmap" button onMouseUp="CreateMovie()">
  109.         <font size=5>Flash Movie</font>
  110.     <tr><td valign=top><img src="images/large_animation.bitmap" button onMouseUp="CreateTimeline()">
  111.         <font size=5>Flash Timeline</font>
  112.     <comment>
  113.     <tr><td valign=top><img src="images/large_animation.bitmap" button onMouseUp="CreateCartoon()">
  114.         <font size=5>Flash Cartoon</font>
  115.     </comment>
  116.     <tr><td valign=top><img src="images/large_animation.bitmap" button onMouseUp="CreateAnimation()">
  117.         <font size=5>Animation</font>
  118. </table>
  119.  
  120. <td>
  121.  
  122. <table cellspacing=4 cellpadding=0 bgcolor="light" borderstyle="raised"><tr><td>
  123.     <table cellspacing=4 cellpadding=4 width=100%><tr>
  124.         <td width=exact valign=top>
  125.         <table cellspacing=0 cellpadding=2>
  126.             <tr><td><input type="radio" name="radio_size" value="1"><a onclick="radio_size=1">320 x 240</a>
  127.             <tr><td><input type="radio" name="radio_size" value="2"><a onclick="radio_size=2">480 x 360</a>
  128.             <tr><td><input type="radio" name="radio_size" value="3"><a onclick="radio_size=3">640 x 480</a>
  129.             <tr><td><input type="radio" name="radio_size" value="4"><a onclick="radio_size=4">468 x 60   (banner)</a>
  130.             <tr><td><input type="radio" name="radio_size" value="5"><a onclick="radio_size=5">Other</a>
  131.             <input type="text" name="user_width" size=5>x
  132.             <input type="text" name="user_height" size=5>
  133.         </table>
  134.     </table>
  135. </table>
  136.  
  137. </table>
  138.  
  139. <spacer height=8>
  140.  
  141. <table cellspacing=0 cellpadding=0 width="100%">
  142. <tr><td align=right>
  143. <a button onMouseUp="window.close()" width=+20 height=+2><img src="images/small_cancel.bitmap" hspace=4>Cancel</a>
  144. </table>
  145.  
  146. <spacer height=4>
  147.